<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"><title>添加分类</title>
        <bootstrapcss/>
       </head>
        <body><form action="/index.php/admin.bookcate/add" method="post">
            <table class="table table-bordered table-hover">
                <tr><th>分类名</th><td><input class="form-control modal-sm" type="text" name="name"></td></tr>
                <tr><th>所属栏目</th><td> 
                    <select class="form-control modal-sm" name="pid"><option value="0">顶级栏目</option>
                        <?php foreach($data as $key => $value) { ?>
                            <option value="<?php  echo $value['id']; ?>"  
                            <?php if($cid == $value['id']){ echo 'selected="selected" '; } echo '>'.str_repeat("-",$value["level"]*2).$value['name']; ?>  </option>
                            <?php } ?>

                        </select>
                    </td></tr>
                <tr><th>排序</th><td><input class="form-control modal-sm" type="text" value ="1" name="sort"></td></tr>
                <tr><th>关键词</th><td><input class="form-control modal-sm" type="text" name="keywords"></td></tr>
                <tr><th>描述</th><td><textarea class="form-control modal-sm" name="description"></textarea></td></tr>
                <tr><th></th><td> <input class="btn btn-success" type="submit" value="提交"></td></tr>
            </table></form>
            <bootstrapjs/>
          </body>
          </html>